package nowcoder.huawei;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.*;

/**
 * @author wuguojian
 * @description
 * @date 2023/4/12 下午9:46
 * https://www.nowcoder.com/practice/a30bbc1a0aca4c27b86dd88868de4a4a
 **/
public class HJ46 {
    public static void main(String[] args) throws FileNotFoundException {
//        Scanner in = new Scanner(new FileReader("input/nowcoder_huawei/HJ46.txt"));
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            String s = in.next();
            int length = in.nextInt();
            System.out.println(s.substring(0, length));
        }
    }
}
